/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package dailydilbert;

import java.io.FileReader;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author iktsup
 */
public class Config {

    public static String HTML       = "html=";
    public static String DEFAULT_CONFIG = "default.config";

    public String htmlOut = "";

    public void readConfig(String file) {
        try {
            FileReader reader = new FileReader(file);

            String s = "";
            int i = 0;
            while ((i = reader.read()) > -1) {
                s += (char) i;
            }

            String conf = s.split("\n")[0];

            conf = conf.substring(Config.HTML.length());

            this.htmlOut = conf;
        } catch (IOException ex) {
            Logger.getLogger(Config.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
}
